@import url('https://fonts.googleapis.com/css?family=Roboto:400,400i,700,700i');

html,
body {
    font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    padding: 0;
}

html {
    margin-top: 72px;
}

a {
    text-decoration: none;
    color: #df3248;
    font-weight: bold;
}

img {
    max-width: 100%;
}

header {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    line-height: 24px;
    padding: 16px;
    height: 24px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
}

header .expand-toc {
    position: relative;
    cursor: pointer;
    z-index: 200;
    transition: margin 0.4s ease-in;
}

header .edit {
    color: #757575;
    font-size: 14px;
    font-weight: 400;
    float: right;
    line-height: 24px;
}

header .edit .material-icons {
    float: left;
    margin-right: 6px;
    margin-top: 4px;
}

h1 {
    font-size: 64px;
    font-weight: 400;
}

h1:after {
    content: '.';
}

h2 {
    margin-top: 64px;
    margin-bottom: 24px;
    font-size: 32px;
    font-weight: 400;
}

h3 {
    margin-top: 48px;
    margin-bottom: 24px;
    font-size: 24px;
}

h2 .anchor,
h3 .anchor {
    opacity: 0;
    margin-left: 10px;
    color: #9b9b9b;
    transition: opacity 0.2s ease;
}

h2:hover .anchor,
h3:hover .anchor {
    opacity: 1;
}

p {
    margin: 24px 0;
}

.content {
    max-width: 960px;
    margin: 0 auto;
    padding: 72px 24px 128px;
    clear: both;
}

main {
    transition: margin 0.4s ease-in;
}

.toc-open main {
    margin-left: 300px;
}

.toc-open header .expand-toc {
    margin-left: 300px;
}

.toc {
    position: fixed;
    left: -300px;
    top: 0;
    bottom: 0;
    width: 300px;
    border-right: 1px solid #eee;
    transition: left 0.4s ease-in;
    z-index: 50;
}

.toc-open .toc {
    left: 0;
}

.toc h4 {
    padding: 16px;
    margin: 0;
    line-height: 24px;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid #eee;
    color: #757575;
}

.toc > div {
    overflow-x: hidden;
    overflow-y: auto;
    position: absolute;
    left: 0;
    top: 57px;
    right: 0;
    bottom: 0;
    padding: 16px;
}

.toc a {
    display: block;
    color: #000;
}

.toc a.h2 {
    font-weight: 400;
    margin-top: 20px;
}

.toc a.h2:first-child {
    margin-top: 0;
}

.toc a.h3 {
    font-weight: 400;
    margin-top: 10px;
    font-size: 80%;
    margin-left: 20px;
}

.code-editor {
    position: relative;
    overflow: hidden;
}

.code-editor-run {
    position: absolute;
    right: 20px;
    bottom: 20px;
    background-color: #161b21;
    padding: 10px 16px;
    border-radius: 5px;
    color: #fff;
    text-align: center;
    font-size: 14px;
    line-height: 24px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.code-editor-run:hover {
    background-color: #df3248;
}

.code-editor-run .material-icons {
    float: left;
    margin-top: 2px;
    margin-right: 10px;
    margin-left: -1px;

}

@media (max-width: 1080px) {
    .content {
        padding-top: 0;
    }
    .content h1 {
        font-size: 48px;
    }
}

@media (max-width: 780px) {
    .toc-open .code-editor-run {
        position: static;
        display: block;
        margin-top: 12px;
    }
}

@media (max-width: 580px) {
    .content h1 {
        font-size: 36px;
        margin-top: 8px;
    }
    .content h2 {
        font-size: 24px;
        margin-top: 48px;
        margin-bottom: 8px;
    }
    .content p {
        margin: 16px 0;
    }
    .code-editor-run {
        position: static;
        display: block;
        margin-top: 12px;
    }
    .expand-toc {
        display: none;
    }
}
